package GUI;

import java.awt.EventQueue;

import javax.swing.JFrame;
import org.openswing.swing.client.ImagePanel;
import java.awt.Toolkit;
import org.openswing.swing.miscellaneous.client.ProgressBar;
import javax.swing.JProgressBar;
import javax.swing.JPanel;
import javax.swing.GroupLayout;
import javax.swing.GroupLayout.Alignment;
import javax.swing.JButton;
import javax.swing.LayoutStyle.ComponentPlacement;
import javax.swing.SwingConstants;
import java.awt.Component;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
import javax.swing.JMenuBar;
import javax.swing.JMenu;
import java.awt.Font;
import javax.swing.JMenuItem;

public class PrincipalGUI {

	private JFrame frmSystemaEstoque;

	/**
	 * Launch the application.
	 */
	public static void main(String[] args) {
		EventQueue.invokeLater(new Runnable() {
			public void run() {
				try {
					PrincipalGUI window = new PrincipalGUI();
					window.frmSystemaEstoque.setVisible(true);
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
		});
	}

	/**
	 * Create the application.
	 */
	public PrincipalGUI() {
		initialize();
	}

	/**
	 * Initialize the contents of the frame.
	 */
	private void initialize() {
		frmSystemaEstoque = new JFrame();
		frmSystemaEstoque.setTitle("Systema Estoque");
		frmSystemaEstoque.setBounds(100, 100, 800, 600);
		frmSystemaEstoque.getContentPane().setLayout(null);
		
		ImagePanel imagePanel = new ImagePanel();
		imagePanel.setImage(Toolkit.getDefaultToolkit().getImage("C:\\Documents and Settings\\informatica\\Meus documentos\\Downloads\\Wallpapers Ubuntu\\37681.jpg"));
		imagePanel.setBounds(10, 11, 772, 521);
		frmSystemaEstoque.getContentPane().add(imagePanel);
		
		JMenuBar menuBar = new JMenuBar();
		frmSystemaEstoque.setJMenuBar(menuBar);
		
		JMenu mnProduto = new JMenu("Produto");
		mnProduto.setFont(new Font("Tahoma", Font.BOLD, 14));
		menuBar.add(mnProduto);
		
		JMenuItem mntmNovo = new JMenuItem("Novo");
		mntmNovo.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent arg0) {
				new NovoGUi().setVisible(true);
			
			}
		});
		mntmNovo.setFont(new Font("Tahoma", Font.BOLD, 14));
		mnProduto.add(mntmNovo);
		
		JMenuItem mntmAlterar = new JMenuItem("Alterar");
		mntmAlterar.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				new AlterarGUI().setVisible(true);
			}
		});
		mntmAlterar.setFont(new Font("Tahoma", Font.BOLD, 14));
		mnProduto.add(mntmAlterar);
		
		JMenuItem mntmExcluir = new JMenuItem("Excluir");
		mntmExcluir.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				new ExcluirGUI().setVisible(true);
			}
		});
		mntmExcluir.setFont(new Font("Tahoma", Font.BOLD, 14));
		mnProduto.add(mntmExcluir);
		
		JMenu mnVenda = new JMenu("Venda");
		mnVenda.setFont(new Font("Tahoma", Font.BOLD, 14));
		menuBar.add(mnVenda);
		
		JMenuItem mntmIniciarVenda = new JMenuItem("Iniciar Venda");
		mntmIniciarVenda.setFont(new Font("Tahoma", Font.BOLD, 14));
		mnVenda.add(mntmIniciarVenda);
		
		JMenu mnPesquisar = new JMenu("Pesquisar");
		
		
		mnPesquisar.setFont(new Font("Tahoma", Font.BOLD, 14));
		menuBar.add(mnPesquisar);
		
		JMenuItem mntmPesquisarProduto = new JMenuItem("Pesquisar Produto");
		mntmPesquisarProduto.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				new PesquisarGUI().setVisible(true);
			
			}
		});
		mnPesquisar.add(mntmPesquisarProduto);
	}
}
